package com.yandadeyu.springBoot.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.Map;

/**
 * Created by Administrator on 2018/3/27.
 */
@Controller
@RequestMapping("freemarker")
public class FreemarkerController {

    @RequestMapping("hello")
    public String  EchoHello(Map<String,Object> map){
        map.put("msg","helloworld");
        return  "helloworld";
    }
    @RequestMapping("helloworld")
    public ModelAndView SayHelloWorld(ModelAndView modelAndView){
        modelAndView.setViewName("helloworld");
        modelAndView.addObject("msg","hellowolrd");
        return  modelAndView;
    }
}
